package reflect;

public class ReflectDemo2 {
    public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
       Person p=new Person();
        System.out.println(p);
        //1获取对应的类对象
        Class cls=Class.forName("reflect.Person");

        Object p2=cls.newInstance();
        System.out.println(p2);


    }
}
